<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org">

<body class="page-header-fixed">
	<div class="page-sidebar nav-collapse collapse" th:fragment="sider" th:with="requestUrl=${#httpServletRequest.getRequestURI()}">
			<!-- BEGIN SIDEBAR MENU -->
			<ul class="page-sidebar-menu">
				<li>
					<!-- BEGIN SIDEBAR TOGGLER BUTTON -->
					<div class="sidebar-toggler hidden-phone"></div> 
					<!-- BEGIN SIDEBAR TOGGLER BUTTON -->
				</li>
				<li>
					<!-- BEGIN RESPONSIVE QUICK SEARCH FORM -->
					<form class="sidebar-search">
						<div class="input-box">
							<a href="javascript:;" class="remove"></a> <input type="text"
								placeholder="搜索..." /> <input type="button" class="submit"
								value=" " />
						</div>
					</form>
					<!-- END RESPONSIVE QUICK SEARCH FORM -->
				</li>

<!-- 				<li class="start active "><a href="index.html"> <i -->
<!-- 						class="icon-home"></i> <span class="title">首页</span> <span -->
<!-- 						class="selected"></span> -->

<!-- 				</a></li> -->



<!-- 				<li class=""><a href="javascript:;"> <i class="icon-th"></i> -->

<!-- 						<span class="title">商品管理</span> <span class="arrow "></span> -->

<!-- 				</a> -->

<!-- 					<ul class="sub-menu"> -->

<!-- 						<li><a href="/beef_jerky"> <i class="icon-time"></i> <span>牛肉干</span> -->
<!-- 						</a></li> -->

<!-- 						<li><a href="table_responsive.html"> 奶酪</a></li> -->

<!-- 						<li><a href="table_managed.html"> 马奶酒</a></li> -->

<!-- 					</ul></li> -->

<!-- 				<li class=""><a href="javascript:;"> <i -->
<!-- 						class="icon-file-text"></i> <span class="title">订单管理</span> <span -->
<!-- 						class="arrow "></span> -->

<!-- 				</a> -->

<!-- 					<ul class="sub-menu"> -->

<!-- 						<li><a href="portlet_general.html"> 已完成订单</a></li> -->

<!-- 						<li><a href="portlet_draggable.html"> 未完成订单</a></li> -->

<!-- 					</ul></li> -->
<!-- 				<li class=""><a href="javascript:;"> <i class="icon-cogs"></i> -->
<!-- 						<span class="title">系统管理</span> <span class="arrow "></span> -->
<!-- 				</a> -->
<!-- 					<ul class="sub-menu"> -->
<!-- 						<li><a href="layout_boxed_page.html">模版配置</a></li> -->
<!-- 						<li><a href="layout_boxed_not_responsive.html">网站设置</a></li> -->
<!-- 					</ul></li> -->
			
			
<!-- 				<li class="start active "><a href="index.html"> <i -->
<!-- 						class="icon-home"></i> <span class="title">首页</span> <span -->
<!-- 						class="selected"></span> -->
<!-- 						</a> -->
<!-- 				</li> -->
				<li class=""  th:each="menu:${session.menus}" th:class="${menu.childUrls}==null?(${requestUrl}==${menu.url}?'active':''):(${#lists.contains(menu.childUrls, requestUrl)}?'active':'')">
					<a th:href="${menu.url}"> 
						<i th:class="${menu.icon}"></i> 
						<span class="title" th:text="${menu.name}">权限管理</span> 
						<span class="arrow" th:class="${#lists.contains(menu.childUrls, requestUrl)}?'arrow open':'arrow'" th:if="${menu.childUrls}!=null"></span>
						<span class="selected" th:class="${menu.url=='/index'?'selected':''}" th:if="(${menu.childUrls}==null and (not ${#lists.isEmpty(menu.childUrls)}))"></span>
					</a>
					<ul class="sub-menu" th:if="(${menu.childMenu}!=null and (not ${#lists.isEmpty(menu.childMenu)}))">						
						<li th:class="${requestUrl}==${childMenu.url}?'active':''"  th:each="childMenu:${menu.childMenu}">
							<a href="/roles" th:href="${childMenu.url}"> <i th:class="${childMenu.icon}"></i> <span th:text="${childMenu.name}">角色管理</span></a>
						</li>						
					</ul>
				</li>
				
			

				
<!-- 				<li class="last "><a href="charts.html"> <i -->
<!-- 						class="icon-bar-chart"></i> <span class="title">客户管理</span> -->

<!-- 				</a></li> -->

			</ul>

			<!-- END SIDEBAR MENU -->

		</div>
	
</body>
</html>